import Vue from 'vue'
import App from './App.vue'
import router from './router'
import 'element-ui/lib/theme-chalk/index.css'
import ElementUI from 'element-ui'

Vue.config.productionTip = false
Vue.use(ElementUI);

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')


router.beforeEach((to,from,next) => {
  var is = false;
  if(to.matched.some(_ => _.meta.requireLogin)){
    if(is){
      next();
    }else{
      next("/Home")
    }
  }else{
    next();
  }
})